package com.ahearttogo.rpc.client;

import com.aharttogo.rpc.transport.HttpTransportClient;
import com.aharttogo.rpc.transport.TransportClient;
import com.ahearttogo.rpc.codec.Decoder;
import com.ahearttogo.rpc.codec.Encoder;
import com.ahearttogo.rpc.codec.JsonDecoder;
import com.ahearttogo.rpc.codec.JsonEncoder;
import com.ahearttogo.rpc.proto.Peer;
import lombok.Data;

import java.util.Arrays;
import java.util.List;

/**
 * @author xiejialin
 * @date 2020/2/17 6:49 PM
 */
@Data
public class RpcClientConfig {

    private Class transportClass = HttpTransportClient.class;
    private Class<? extends Encoder> encoderClass = JsonEncoder.class;
    private Class<? extends Decoder> decoderClass = JsonDecoder.class;
    private Class<? extends  TransportSelector> selectorClass = RandomTransportSelector.class;
    private int connectCount = 1;
    private List<Peer> servers = Arrays.asList(new Peer("127.0.0.1",3000));
}
